home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / progs / editor / frexxed / fpl / twist.fpl < prev    next >
Text File  |  1995-07-18  |  493b  |  23 lines

  1. void export Twist() 
  2. {
  3.   int tkn1, tkn2, im;
  4.   Visible(0);
  5.   tkn1=GetChar();
  6.   if (ReadInfo("byte_position")) {
  7.     if (tkn1<0 || Isnewline(tkn1)) {
  8.       if (ReadInfo("byte_position")==1)
  9.         return;
  10.       CursorLeft();
  11.       tkn1=GetChar();
  12.     }
  13.     im=ReadInfo("insert_mode");
  14.     CursorLeft();
  15.     tkn2=GetChar();
  16.     SetInfo(-1, "insert_mode", 0);
  17.     Output(sprintf("%c%c", tkn1, tkn2));
  18.     SetInfo(-1, "insert_mode", im);
  19.     Visible(1);
  20.   }
  21. }
  22. AssignKey("Twist();", "Control t");
  23.